package club.gskj.gulimall.search.feign;

import club.gskj.common.utils.R;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @ClassName ProductFeignService
 * @Description TODO
 * @Author 康纳
 * @Date 2021-03-08
 */

@FeignClient("gulimall-product")
public interface ProductFeignService {

    /**
     * 根据id 查询 属性信息
     */
    @GetMapping("/product/attr/info/{attrId}")
    public R getAttrInfo(@PathVariable("attrId") Long attrId);

    @GetMapping("/product/brand/infos")
    public R brandInfos(@RequestParam("brandIds") List<Long> brandIds);
}
